class Solution {
    public int[] dailyTemperatures(int[] temperatures) {
        if(temperatures.length==0){
            return new int[0];
        }
        int len=temperatures.length;
        int [] arr=new int[len];
        for(int i=0;i<len-1;i++){
            int count=0;
            for(int j=i+1;j<len;j++){
                if(temperatures[j]>temperatures[i]){
                    count++;
                     break;
                }else{

                    count++;
                }
            }
            arr[i]=count;
        }
        return arr;
    }
}